<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php"); ?>

<?php
//http://t.evolution.com/controller/detail/controller/update_col.php?nid=3702&ai_name=markorder&sum=1
//需要参数nid，确定哪条数据
//ai_name，需要更改的字段名称
//sum，需要更改的内容
//返回0则是失败，返回1就是修改成功。



$_p['nid']        =$_REQUEST['nid'];
$_p[$_REQUEST['ai_name']] =$_REQUEST['sum'];

//print_r2($_p);

$sqlstr = update_date($table_prefix."detail",$_p,"nid",$_p['nid']);

//echo $sqlstr;

$query = mysql_query($sqlstr) or die ( error_log());

    if($query)
    {
        $result['error'] = "0";
    }
    else
    {
        $result['error'] = "1";
    }

    echo json_encode($result);
    exit;
?>


